<script src="/server/static/js/jquery.min.js"></script>

<form action="/doLogin">
    <input type="text" name="userName" id="userName" value="zhangsan"/> </br>
    <input type="password" name="password" id="password" value="000000"> </br>
    <input type="button" id="btnLogin" value="登录"/>
</form>


<script>
    $(function () {
        $("#btnLogin").click(function (e) {
            e.preventDefault();

            var userName = $("#userName").val();
            var password = $("#password").val();
            var clientUrl = "${(RequestParameters.clientUrl)!}";
            console.log("clientUrl=" + clientUrl);

            var param = {userName: userName, password: password};
            $.post("/server/doLogin", param, function (data) {
                if (data && data.jsonStatus === "SUCCESS") {
                    alert(data.msg);
                    //跳转到客户端url
                    location.reload();
                }
            });
        });

    })
</script>